package com.wchat.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wchat.dataobject.OrderDetail;
import com.wchat.enums.OrderStatusEnum;
import com.wchat.enums.PayStatusEnum;
import com.wchat.serviceimpl.serializer.Date2LongSerialezer;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by yangtianrui on 17/8/11.
 */
@Data
@DynamicUpdate
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderDto {

    private String orderId;
    /**买家姓名*/
    private String buyerName;
    /**买家电话*/
    private String buyerPhone;
    /**买家地址*/
    private String buyerAddress;
    /**买家openid*/
    private String buyerOpenid;
    /**订单数量*/
    private BigDecimal orderAmount;
    /**默认新订单 订单状态*/
    private Integer orderStatus ;
    /**订单状态 默认为0 未支付 */
    private Integer payStatus ;
    /**创建时间*/
    @JsonSerialize(using = Date2LongSerialezer.class)
    private Date createTime;
    /**修改时间*/
    @JsonSerialize(using = Date2LongSerialezer.class)
    private Date updateTime;
    /**订单详情种类*/
    private List<OrderDetail> orderDetails;

}
